<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title th:text="${sectionName}"></title>
    <head th:insert="~{import :: head}"></head>
</head>
<body>
<div th:insert="~{navigation :: nav}"></div>
<div class="container-fluid main profile">

    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
        <div class="media" th:each="collection : ${pagination.data}">

            <div class="media-body">
                <h5 class="media-heading">
                    <a th:href="@{'/question/'+ ${collection.id}}" th:text="${collection.title}"></a>
                </h5>
            </div>
        </div>
    </div>

    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
        <nav aria-label="Page navigation">
            <ul class="pagination">
                <li th:if="${pagination.showFirstPage}">
                    <a th:href="@{'/profile/'+${section}(page=${1})}"
                       aria-label="Previous">
                        <span aria-hidden="true">&lt;&lt;</span>
                    </a>
                </li>
                <li th:if="${pagination.showPrevious}">
                    <a th:href="@{'/profile/'+${section}(page=${pagination.page - 1})}" aria-label="Previous">
                        <span aria-hidden="true">&lt;</span>
                    </a>
                </li>

                <li th:each="page : ${pagination.pages}" th:class="${pagination.page == page}? 'active' : ''">
                    <a th:href="@{'/profile/'+${section}(page=${page})}" th:text="${page}"></a>
                </li>

                <li th:if="${pagination.showNext}">
                    <a th:href="@{'/profile/'+${section}(page=${pagination.page +1})}" aria-label="Previous">
                        <span aria-hidden="true">&gt;</span>
                    </a>
                </li>
                <li th:if="${pagination.showEndPage}">
                    <a th:href="@{'/profile/'+${section}(page=${pagination.totalPage})}" aria-label="Previous">
                        <span aria-hidden="true">&gt;&gt;</span>
                    </a>
                </li>
            </ul>
        </nav>
    </div>
</div>
</div>
<div th:insert="~{footer :: foot}"></div>
</body>
</html>